public class DesktopComponent extends Component implements Serializable { String label; DesktopComponent() { super(); } DesktopComponent( String s ) { super(); this.setLabel( s ); } public void setLabel( String s ) { this.label = s; } public String getLabel() { return this.label; } public void setX( int i ) { this.setLocation( i, this.getLocation().y ); } public int getX() { return this.getLocation().x; } public void setY( int i ) { this.setLocation( this.getLocation().x, i ); } public int getY() { return this.getLocation().y; } public void setWidth( int i ) { this.setSize( i, this.getSize().height ); } public int getWidth() { return this.getSize().width; } public void setHeight( int i ) { this.setSize( this.getSize().width, i ); } public int getHeight() { return this.getSize().height; } private void writeObject( ObjectOutputStream s ) throws IOException { s.defaultWriteObject(); } private void readObject( ObjectInputStream s ) throws ClassNotFoundException, IOException { s.defaultReadObject(); } }
Previous | Next |